import path from 'path';
import {
    themePreprocessorPlugin,
} from "@zougt/vite-plugin-theme-preprocessor";

export default function themePreprocessor() {
    return themePreprocessorPlugin({
        less: {
            // 各个主题文件的位置
            multipleScopeVars: [
                {
                    scopeName: "theme-blue",
                    path: path.resolve("src/assets/theme/blue.less"),
                }, {
                    scopeName: "theme-green",
                    path: path.resolve("src/assets/theme/green.less"),
                }, {
                    scopeName: "theme-yellow",
                    path: path.resolve("src/assets/theme/yellow.less"),
                }, {
                    scopeName: "theme-red",
                    path: path.resolve("src/assets/theme/red.less"),
                }, {
                    scopeName: "theme-purple",
                    path: path.resolve("src/assets/theme/purple.less"),
                }
            ],
        },
    });
}